﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MeetSomeNearbyStrangerWebApi.Repositories
{
    public class PubNubSender
    {
        private PubnubAPI pubnub;

        public PubNubSender()
        {
            this.pubnub = new PubnubAPI(
                "pub-c-1b02dca4-3f12-483d-b402-eba2fa82ed42",               // PUBLISH_KEY
                "sub-c-9c252de4-33fa-11e3-8450-02ee2ddab7fe",              // SUBSCRIBE_KEY
                "sec-c-NTMyMjk3ZmMtYzIyZC00YzgwLWEwODMtNTMwYTMxZTQ4YjI1",   // SECRET_KEY
                true                                                        // SSL_ON?
            );
        }

        public void Send(string channelName, string message)
        {
            pubnub.Publish(channelName, message);
        }
    }
}